import React, { useRef, memo } from 'react';
import { ActionType } from '@/components/ProTable';
import KeepAliveHoc from '@/components/KeepAliveHoc';
import styles from './index.less';
import DoorTable from './components/DoorTable';
import Tree from './components/Tree';
export const modelName = 'door';
import Drawer from '@/pages/DoorGroup/components/Drawer';

const Card = () => {
  const actionRef = useRef<ActionType>();
  return (
    <div className={styles['user-container']}>
      <Drawer>
        <div className={styles['area-list-wrap']}>
          <div className={styles['area-list-title']}>区域选择</div>
          <Tree />
        </div>
      </Drawer>
      <div className={styles['table-wrap']}>
        <DoorTable actionRef={actionRef} />
      </div>
    </div>
  );
};

export default KeepAliveHoc(memo(Card));
